package com.poisonh.unifiedauth.ui;

import android.os.Bundle;
import android.view.View;
import android.webkit.WebSettings;
import android.webkit.WebView;

import com.poisonh.unifiedauth.R;

/**
 * 帮助
 * Created by PoisonH on 2016/8/1.
 */
public class QrHelpActvity extends BaseActivity implements View.OnClickListener
{
    private WebView mWbView;
    @Override
    protected void loadContentView(Bundle savedInstanceState)
    {
        setContentView(R.layout.activity_qrhelp);
        initTitleView();
        initView();
    }

    @Override
    protected void initView()
    {
        setTitleTxt("帮助");
        mRightBtn.setVisibility(View.GONE);
        mLeftBtn.setOnClickListener(this);
        mWbView = (WebView) findViewById(R.id.wv_webview);
        WebSettings settings = mWbView.getSettings();
        settings.setLayoutAlgorithm(WebSettings.LayoutAlgorithm.NARROW_COLUMNS);
        settings.setUseWideViewPort(true);//设置此属性，可任意比例缩放
        settings.setLoadWithOverviewMode(true);
        settings.setJavaScriptEnabled(true);
        // mWbView.loadUrl("content://com.android.htmlfileprovider/sdcard/index.html");

        mWbView.loadUrl("file:///android_asset/qr_help.html");
    }

    @Override
    public void onClick(View v)
    {
        switch (v.getId())
        {
            case R.id.ib_left_btn:
                finish();
                break;
        }
    }
}
